

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>


<%@ page   pageEncoding="utf-8"%>
<%request.setCharacterEncoding("utf-8");%>

<html>
<head>

   <title>账户列表</title>
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <!-- 引入 Bootstrap -->
   <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">


        <style>
        button{
            text-align: center;
            padding: 5px;
            width: 7%;
            margin-top: 40px;
            background-image: linear-gradient(to right, #a6c1ee, #fbc2eb);
        }

        body {
            background: url('https://cdn.pixabay.com/photo/2018/08/14/13/23/ocean-3605547_1280.jpg') no-repeat;
            background-size: 100% 130%;
        }



        /*font-size:50px; !*设置字体大小*!*/
        /*font-weight:300; !*设置字体粗细*!*/
        /*text-shadow:1px 0px #009916, 1px 2px #006615, 3px 1px #009916,*/
        /*2px 3px #006615, 4px 2px #009916, 4px 4px #006615,*/
        /*5px 3px #009916, 5px 5px #006615, 7px 4px #009916,*/
        /*6px 6px #006615, 8px 5px #009916, 7px 7px #006615,*/
        /*9px 6px #009916, 9px 8px #006615, 11px 7px #009916!*设置文字阴影*!*/


        #admin{
            color: #30cfd0; /*设置文字颜色*/
            text-decoration: none;
            font-size: 1.2em; /*设置字体大小*/
            font-family: "楷体"; /*设置字体*/
            -webkit-animation: shine 0.5s infinite; /*设置动画*/
            margin-left: 700px;
        }

        #zhanghu{
            color:#b94648; /*设置文字颜色*/
            text-decoration: none;
            font-size: 2em; /*设置字体大小*/
            font-family: "方正粗黑宋简体"; /*设置字体*/
            -webkit-animation: shine 0.2s infinite; /*设置动画*/
           text-align: center;
        }

        @-webkit-keyframes shine { /*创建动画*/
            0%, 100% {
                color: #fff;
                text-shadow: 0 0 10px #0000FF, 0 0 10px #0000FF;
            }
            50% {
                text-shadow: 0 0 10px #0000FF, 0 0 40px #0000FF;
            }
        }




        </style>
</head>
<body>

<div class="container">

   <div class="row clearfix" align="center">
       <div class="col-md-12 column">
           <div class="page-header">
               <h1>
                   <small style="color:gold" id="zhanghu"> 显示所有账户</small>
                  <small style="color:red" id="admin">欢迎你:${admin}</small>
               </h1>
           </div>
       </div>
   </div>

   <div class="row">
       <div class="col-md-4 column">
           <a class="btn btn-primary" href="${pageContext.request.contextPath}/save.jsp">新增</a>
       </div>

    <div class="col-md-4 column">
<form class="form-inline" action="${pageContext.request.contextPath}/account/findByIds" method="post">
    <b> <span style="color:orangered" id="mess">${mess}</span></b>

    <input type="text" name="name" placeholder="输入要查询的账号名" id="search">
    <input type="submit" value="查询" class="btn btn-primary" >
</form>

    </div>
</div>

   <div class="row clearfix">


       <div class="col-md-12 column">

           <table class="table table-hover table-striped" style="background: khaki">

               <thead>
               <tr>
                   <th>账户id</th>
                   <th>账户名称</th>
                   <th>账户金额</th>
                   <th>账户描述</th>
                   <th>操作</th>
               </tr>
               </thead>

               <tbody>
               <c:forEach items="${accountList}" var="account">
                   <tr>

                         <td>${account.id}</td>
                        <td>${account.name}</td>
                        <td>${account.money}</td>
                        <td>${account.detail}</td>

                       <td>

                           <div class="row">
                               <div class="col-md-1 column">
                                   <a class="btn btn-primary" href="${pageContext.request.contextPath}/account/toUpdateById?id=${account.id}">更改</a>
                               </div>
                           </div>
                       </td>
                        <td>
                            <div class="row">
                                <div class="col-md-1 column">
                                    <a class="btn btn-primary"href="${pageContext.request.contextPath}/account/deleteById?id=${account.id}">删除</a>
                                </div>
                            </div>

                   </td>
                   </tr>

               </c:forEach>
               </tbody>
           </table>
           <br><br>
           <div class="row">
               <div class="col-md-7 column">
                   <a class="btn btn-primary" href="${pageContext.request.contextPath}/index.jsp">退出登录</a>
                   <a class="btn btn-primary" href="${pageContext.request.contextPath}/account/findUsers">查看所有登录用户</a>
               </div>
           </div>





   </div>
</div>

</div>


<%--清除信息--%>
<script type="text/javascript">
 document.onload=function () {
document.getElementById("search").onfocus=function () {
    document.getElementById("mess").innerText="";
}
 }

</script>